package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description 商品信息
 */
@Mapper
public interface GoodsDao {


    String getMaxCode();


    List<Goods> listInventory(@Param("page") Integer page, @Param("rows")Integer rows, @Param("codeOrName")String codeOrName, @Param("goodsTypeId")Integer goodsTypeId);
    //分页查询无库存商品信息
    List<Goods> getNoInventoryQuantity(Integer page, Integer rows, String nameOrCode);
    //分页查询有库存商品信息
    List<Goods> getHasInventoryQuantity(Integer page, Integer rows, String nameOrCode);
    //添加商品期初库存
    void saveStock(@Param("goodsId") Integer goodsId, @Param("inventoryQuantity") Integer inventoryQuantity,@Param("purchasingPrice")  double purchasingPrice);


    //根据id获取商品
    Goods getGoods(Integer goodsId);
    //删除商品库存
    void deleteStock(Integer goodsId);



}
